define(['require', './PageView','../libs/extend'], function (require, PageView, extend) {
    return PageView.extend({
        events: {
            'click .main-attachment': 'proattach',
        },
        proattach: function (e) {
            var users = extend.getlocalStorage('YY_userInfo');
            var YY_themsID = extend.getlocalStorage('YY_themsID');
            var attachHTML = $(e.currentTarget).text().trim();
            window.location.href = window.app.proxy.root + 'researchRecordFileDownload' + '?userId=' + users.userId + "&pk_record=" + YY_themsID + '&fileName=' + attachHTML + '&attachmenttype=proattachment'

        },

        //initialize
        initialize: function (options) {

        },
        onResume: function () {
            var _this = this;
            var dataList = extend.getlocalStorage('YY_themsID');
            var indexData={
                "pk_record":dataList
            };
            extend.sendData(window.app.proxy.root + 'getResearchRecordDetail', indexData, function(res){
                if(res.status=="success"){
                    _this.findComponent("Particularmain").themeData.set(res.data);
                }else{
                    extend.Toast(res.message,2000);
                }
            });

        },

    })
});





